#version 330 core
#define TOTAL_PRIM_CNT 164
#define CUBE_VERTEX_CNT 36
layout(location = 0) in vec4 vertexPosition;

uniform int prime_vertexcnt;
uniform int prime_offset;
uniform sTransform {
    mat4 MVP[TOTAL_PRIM_CNT];
};


void main()
{
    uint prime_index = uint(prime_offset / CUBE_VERTEX_CNT +(gl_VertexID - prime_offset) / prime_vertexcnt);
    gl_Position = MVP[prime_index] * vertexPosition;

}
